{% include vars.html %}

<nav class="navbar navbar-static-top navbar-light">
  <div class="container">
    <a href="{{url_base}}/">
      {% include svg/yarn-kitten-full.svg class="navbar-logo" %}
      <span class="sr-only">Yarn</span>
    </a>

    <div class="clearfix hidden-lg-up">
      <button class="navbar-toggler hidden-lg-up float-right" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="exCollapsingNavbar2"
        aria-expanded="false" aria-label="Toggle navigation"></button>
    </div>

    <div class="collapse navbar-toggleable-md" id="navbar">
      <ul class="nav navbar-nav">
        <li class="nav-item">
          <a class="nav-link" href="{{url_base}}/docs/getting-started">{{i18n.site_nav_getting_started}}</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="{{url_base}}/docs">{{i18n.site_nav_documentation}}</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="{{url_base}}/packages">{{i18n.site_nav_packages}}</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="{{site.baseurl}}/blog">{{i18n.site_nav_blog}}</a>
        </li>
      </ul>

      <ul class="nav navbar-nav navbar-nav-right float-lg-right">
        {% assign path = page.url | split: '/' %} {% unless path[1] == 'blog' %}
        <li class="nav-item dropdown">
          <a id="dropdownNavLanguage" class="nav-link dropdown-toggle" role="button" href="#" data-toggle="dropdown" aria-haspopup="true"
            aria-expanded="false">
            {% include svg/language.svg class="navbar-icon" %} {{vars_active_language.name}}
            </a>
            <div class="dropdown-menu" aria-labelledby="dropdownNavLanguage" id="dropdownNavLanguageMenu">
              {% for language in site.data.languages %} {% if language.enabled %}
              <a href="{{site.baseurl}}/{{language.tag}}/{{vars_url_relative}}" class="dropdown-item{% if vars_active_language.tag == language.tag %} active{% endif %}"
                data-lang="{{language.accept_languages[0]}}">
                {{language.name}}
                </a>
                {% endif %} {% endfor %}
            </div>
        </li>
        {% endunless %}

        <li class="nav-item">
          <a class="nav-link" href="https://discord.gg/yarnpkg">
            {% include svg/discord.svg class="navbar-icon" %}
            <span class="sr-only">Discord</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="https://twitter.com/yarnpkg">
            {% include svg/twitter.svg class="navbar-icon" %}
            <span class="sr-only">Twitter</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="https://www.facebook.com/yarnpkg">
            {% include svg/facebook.svg class="navbar-icon" %}
            <span class="sr-only">Facebook</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="https://github.com/yarnpkg">
            {% include svg/github.svg class="navbar-icon" %}
            <span class="sr-only">GitHub</span>
          </a>
        </li>
      </ul>
    </div>
  </div>
</nav>
